﻿package com.tvein.sanguo.swc.zone
{
	import flash.display.MovieClip;
	import flash.events.Event;
	import flash.display.StageAlign;
	import flash.display.StageScaleMode;
	
	public class ZoneShell extends MovieClip
	{
		public static const NAME:String = "ZoneShell";
		
		public function ZoneShell()
		{
			stage?init(null):addEventListener(Event.ADDED_TO_STAGE, init);
		}
		
		private function init(evt:Event):void
		{
			removeEventListener(Event.ADDED_TO_STAGE , init);
			addEventListener(Event.REMOVED_FROM_STAGE, _onRemoved);

			stage.scaleMode = StageScaleMode.NO_SCALE;
			stage.align = StageAlign.TOP_LEFT;
		}
		
		private function _onRemoved(evt:Event):void
		{
			removeEventListener(Event.REMOVED_FROM_STAGE, _onRemoved);
		}
	}
}